package com.xhkj.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.xhkj.model.MyVehicleNoPassData;

public interface MyVehicleNoPassDataDao extends JpaRepository<MyVehicleNoPassData, Long> {
	@Query(value=" select * from my_vehicle_no_pass_data where my_state = ?1 limit 150000" ,nativeQuery = true)
	public List<MyVehicleNoPassData> getListByState(int state);
	@Query(value="select count(id) from MyVehicleNoPassData where myState = ?1")
	public int getCountState(int state);
	@Transactional
	@Query(value = "delete from MyVehicleNoPassData  where myState = ?1")
	@Modifying
	int deleteByState(int state);
}